package com.hyk.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hyk.domain.UserAuthInfo;
import com.hyk.mapper.UserAuthInfoMapper;
import com.hyk.service.UserAuthInfoService;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserAuthInfoServiceImpl extends ServiceImpl<UserAuthInfoMapper, UserAuthInfo> implements UserAuthInfoService{

    @Override
    public List<UserAuthInfo> getUserAuthInfoByUserId(String id) {
        QueryWrapper<UserAuthInfo> wrapper = new QueryWrapper<>();
        wrapper.eq("user_id",id);
        return list(wrapper);
    }

    @Override
    public List<UserAuthInfo> getUserAuthInfoByCode(Long authCode) {
        QueryWrapper<UserAuthInfo> wrapper = new QueryWrapper<>();
        wrapper.eq("auth_code",authCode);
        return list(wrapper);
    }
}
